   // 引用axios
var axios = require('axios')
function apiAxios(method, url, params) {
    return axios({
        method: method,
        url: url,
        params: params,
        baseURL: "https://c.y.qq.com"
    })
}
export default {
    get: function(url, params) {
        if (params == undefined) {
            params = {}
        }
        return apiAxios('GET', url, params)
    },
    post: function(url, params, token) {
        return apiAxios('POST', url, params)
    },
    put: function(url, params, token) {
        return apiAxios('PUT', url, params)
    },
    delete: function(url, params, token) {
        return apiAxios('DELETE', url, params)
    },
    axios
}
